﻿using UnityEngine;
using System.Collections;

public class CameraLookAt : MonoBehaviour {

	public Transform target;
	public float height = 0.0f;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		if (target) {
			Vector3 xyz = Vector3.Lerp(transform.position, target.position + Vector3.up * height, Time.deltaTime);
			transform.position = new Vector3(xyz.x, xyz.y, transform.position.z);
		}
	}
}
